using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml;

namespace Portal.Ajax
{
    public partial class Popup : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string strID = Request.QueryString["id"] != null ? Request.QueryString["id"].ToString() : "-1";
            XmlDocument doc = new XmlDocument();
            doc.Load(Server.MapPath("/Ajax/PopupXML.xml"));

            XmlNodeList noteID = doc.SelectNodes("//id");
            XmlNodeList notePath = doc.SelectNodes("//path");

            string strPath = "";
            for (int i = 0; i < noteID.Count; i++)
            {
                if (noteID[i].InnerText.Trim() == strID)
                {
                    strPath = notePath[i].InnerText.Trim();
                    break;
                }
            }



            Control ctr = LoadControl(strPath);
            plhControl.Controls.Add(ctr);
        }
    }
}
